package com.wiloon.java8x.io.nio;

import java.nio.ByteBuffer;
import java.nio.CharBuffer;

/**
 * Created by roy on 4/24/17;
 */
public class BufferX {
    public static void main(String[] args) {
        ByteBuffer buffer = ByteBuffer.allocate(32);
        CharBuffer charBuffer = buffer.asCharBuffer();
        String content = charBuffer.put("Hello ").put("World").flip().toString();
        System.out.println(content);
    }
}
